package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 请求方法限定
 * @author stone
 * @date 2022/08/05 17:36
 */
@Controller//("method")
@RequestMapping("method")
public class MethodController {

    //@RequestMapping(value = "get",method = RequestMethod.GET)
    @GetMapping("get")
    @ResponseBody
    public BaseRespVo methodGet() {
        return BaseRespVo.ok("GET");
    }
    //@RequestMapping(value = "post",method = RequestMethod.POST)
    @PostMapping("post")
    @ResponseBody
    public BaseRespVo methodPost() {
        return BaseRespVo.ok("POST");
    }
    @RequestMapping(value = "double",method = {RequestMethod.GET,RequestMethod.POST})
    @ResponseBody
    public BaseRespVo methodDouble() {
        return BaseRespVo.ok("DOUBLE");
    }
}
